package com.xin.view.androidremotecontrol;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.view.View;

import com.xin.view.DiskMenuView;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        DiskMenuView diskMenuView=findViewById(R.id.move_view);
        diskMenuView.setChangeStateListener(new DiskMenuView.OnChangeStateListener() {
            @Override
            public void onChangeState(int area) {
                log("onChangeState() called with: area = [" + area + "]");
            }

        });
        findViewById(R.id.root).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                log("onClick() root called with: v = [" + v + "]");;
            }
        });
    }

    private void log(String s) {
        System.out.println(s);
    }
}
